/**
 * Project Name:scapp-web
 * File Name:ItemController.java
 * Package Name:com.sc.controller
 * Date:2018年7月4日上午10:45:10
 * Copyright (c) 2018, bluemobi All Rights Reserved.
 */

package com.sc.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.sc.pojo.Items;
import com.sc.service.ItemsService;

/**
 * Description: <br/>
 * Date: 2018年7月4日 上午10:45:10 <br/>
 * 
 * @author liutao
 * @version
 * @see
 */
@Controller
public class ItemController {
    @Autowired
    private ItemsService itemsService;

    @ResponseBody
    @RequestMapping("/selectItemsAllInfo")
    public List<Items> selectItemsAllInfo() {
        List<Items> list = itemsService.selectItemsAllInfo();
        return list;

    }

    @RequestMapping("/AnChang")
    public String checkAnChang(Model model) {
        List<Items> list = itemsService.selectItemsAllInfo();
        System.out.println(list.size());
        model.addAttribute("list", list);
        return "sc-anchang";

    }

    @RequestMapping("/pinfo")
    public String picinfo() {
        return "sc-picinfo";
    }

}
